package com.ruoyi.health.report.service.impl;


import java.util.List;

import com.ruoyi.health.report.domain.HealthRisk;
import com.ruoyi.health.report.mapper.HealthRiskMapper;
import com.ruoyi.health.report.service.IHealthRiskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 健康风险Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-25
 */
@Service
public class HealthRiskServiceImpl implements IHealthRiskService
{
    @Autowired
    private HealthRiskMapper healthRiskMapper;

    /**
     * 查询健康风险
     *
     * @param id 健康风险ID
     * @return 健康风险
     */
    @Override
    public HealthRisk selectHealthRiskById(Long id)
    {
        return healthRiskMapper.selectHealthRiskById(id);
    }

    /**
     * 查询健康风险列表
     *
     * @param healthRisk 健康风险
     * @return 健康风险
     */
    @Override
    public List<HealthRisk> selectHealthRiskList(HealthRisk healthRisk)
    {
        return healthRiskMapper.selectHealthRiskList(healthRisk);
    }

    /**
     * 新增健康风险
     *
     * @param healthRisk 健康风险
     * @return 结果
     */
    @Override
    public int insertHealthRisk(HealthRisk healthRisk)
    {
        return healthRiskMapper.insertHealthRisk(healthRisk);
    }

    /**
     * 修改健康风险
     *
     * @param healthRisk 健康风险
     * @return 结果
     */
    @Override
    public int updateHealthRisk(HealthRisk healthRisk)
    {
        return healthRiskMapper.updateHealthRisk(healthRisk);
    }

    /**
     * 批量删除健康风险
     *
     * @param ids 需要删除的健康风险ID
     * @return 结果
     */
    @Override
    public int deleteHealthRiskByIds(Long[] ids)
    {
        return healthRiskMapper.deleteHealthRiskByIds(ids);
    }

    /**
     * 删除健康风险信息
     *
     * @param id 健康风险ID
     * @return 结果
     */
    @Override
    public int deleteHealthRiskById(Long id)
    {
        return healthRiskMapper.deleteHealthRiskById(id);
    }
}
